package com.concurrentlearn;

/**
 * Created by Lxk on 2019/12/1.
 */
public class TaxCalculatorMain {

    public static void main(String[] args) {
//        TaxCalculator calculator = new TaxCalculator(30000d, 100000d) {
//            @Override
//            protected double calTax() {
//                return getSalary() * 0.1 + getBonus() * 0.15;
//            }
//        };
//        double tax = calculator.calculate();
//        System.out.println(tax);
        TaxCalculator calculator = new TaxCalculator(10000d, 1000000d);
        CalculatorStrategy strategy = new SimpleCalculator();
        calculator.setCalculatorStrategy(strategy);
        System.out.println(calculator.calculate());

    }

}
